package com.sx.art2.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sx.art2.beans.Art;
import com.sx.art2.beans.AuctionInfo;
import com.sx.art2.mapper.AuctionInfoMapper;
import com.sx.art2.service.AuctionInfoService;
import com.sx.art2.tools.Page;

@Service
public class AuctionInfoServiceImpl implements AuctionInfoService {

	
	@Autowired
	AuctionInfoMapper auctionInfoMapper;
	@Override
	public List<AuctionInfo> list(Page page,int state) {
		// TODO 自动生成的方法存根
		return auctionInfoMapper.list(page,state);
	}
	@Override
	public AuctionInfo lookArt(int auctionInfoId) {
		// TODO 自动生成的方法存根
		return auctionInfoMapper.selectByauctionInfoId(auctionInfoId);
	}
	@Override
	public AuctionInfo getArt(int auctionInfoId) {
		// TODO 自动生成的方法存根
		return auctionInfoMapper.getArtInfo(auctionInfoId);
	}
	@Override
	public int getTotalCount() {
		// TODO 自动生成的方法存根
		return auctionInfoMapper.getTotalCount();
	}
	@Override
	public List<AuctionInfo> list(int state) {
		// TODO Auto-generated method stub
		return auctionInfoMapper.byStatelist(state);
	}
	@Override
	public AuctionInfo selectAuctionInfoById(int auctionInfoId) {
		// TODO Auto-generated method stub
	    return auctionInfoMapper.selectByauctionInfoId(auctionInfoId);
	}
	@Override
	public void update(AuctionInfo auctionInfo) {
		// TODO Auto-generated method stub
		auctionInfoMapper.update(auctionInfo);	
	}
	@Override
	public List<AuctionInfo> selectAll(Art art) {
		// TODO Auto-generated method stub
		return auctionInfoMapper.selectAll(art);
	}
	@Override
	public List<AuctionInfo> selectLikeAuction(Integer categoryId,String artSize, String auctionNowPrice) {
		// TODO Auto-generated method stub
		return auctionInfoMapper.selectLikeAuction(categoryId,artSize,auctionNowPrice);
	}
	@Override
	public List<AuctionInfo> selectLikePreviewAuction(Integer categoryId, String artSize, String auctionNowPrice) {
		// TODO Auto-generated method stub
		return auctionInfoMapper.selectLikePreviewAuction(categoryId, artSize, auctionNowPrice);
	}
	public void updateState(int auctionInfoId,int auctionState) {
		// TODO Auto-generated method stub
		auctionInfoMapper.updateState(auctionInfoId, auctionState);
	}
	@Override
	public void auctionComfirm(int auctionInfoId, int auctionState) {
		// TODO Auto-generated method stub
		auctionInfoMapper.auctionComfirm(auctionInfoId, auctionState);
	}
	@Override
	public List<AuctionInfo> success(Page page) {
		// TODO Auto-generated method stub
		return auctionInfoMapper.success(page);
	}

}
